package com.roy.galaxy.algorithm;

import java.util.Stack;

/**
 * @author gang.wang1903@xiaobao100.cn
 * @Date: 2019-09-27 15:44
 */
public class Solution1 {


    Stack<Integer> stack1 = new Stack<Integer>();
    Stack<Integer> stack2 = new Stack<Integer>();

    public  void push(int node) {

        stack1.push(node);
    }

    public int pop() {
        int result;
        if(stack2.empty()){
            while(!stack1.empty()){
                stack2.push(stack1.pop());
            }
        }
        result = stack2.pop();
        return result;
    }

    public static void main(String[] args) {
        new Solution1().push(1);
    }
}


